import request from '@/utils/request'

// 查询测试列表
export function listTest(testPlanList,query) {
  return request({
    url: '/user/project/test/list/'+testPlanList,
    method: 'get',
    params: query
  })
}

// 查询测试列表
export function listAllTest(testPlanList,query) {
  return request({
    url: '/user/project/test/listAll/'+testPlanList,
    method: 'get',
    params: query
  })
}

// 查询测试详细
export function getTest(testId) {
  return request({
    url: '/user/project/test/' + testId,
    method: 'get'
  })
}

// 新增测试
export function addTest(testPlanList,data) {
  return request({
    url: '/user/project/test/' + testPlanList,
    method: 'post',
    data: data
  })
}

// 修改测试
export function updateTest(data) {
  return request({
    url: '/user/project/test/',
    method: 'put',
    data: data
  })
}
// 修改测试明细
export function editTestAndTestStepVo(data) {
  return request({
    url: '/user/project/test/editTestAndTestStepVo',
    method: 'put',
    data: data
  })
}
// 删除测试
export function delTest(testId) {
  return request({
    url: '/user/project/test/' + testId,
    method: 'delete'
  })
}

// 获取测试详细信息
export function getTestAllInit(testId) {
  return request({
    url: '/user/project/test/testAllInit/' + testId,
    method: 'get'
  })
}
